import request from '@/utils/request'
/**
 *  获取所有权限
 * @returns
 */
export function getPermissionList() {
  return request({
    method:'get',
    url:'/sys/permission'
  })
}
/**
 * 根据id删除权限
 * @returns
 */
export function delPermission(id){
  return request({
    method: 'delete',
    url:'/sys/permission/'+ id
  })
}
/**
 *  添加权限
 * @param {*} data
 * @returns
 */
export function addPermission(data){
  return request({
    method: 'post',
    url: '/sys/permission',
    data
  })
}
/**
 * 更新权限
 * @param {*} data
 * @returns
 */
export function editPermission(data){
  return request({
    method:'put',
    url:'/sys/permission/' + data.id,
    data
  })
}
